@bgColor: #fff; //背景纯白色
@fontColorH3: #333; //标题文字黑色
@fontColorP: #666; //常规文字 深灰色
@tipColor: #999; //提示文字 浅灰色
@borderColor: #f5f5f5; //边框颜色 淡灰色
@navbarTitle: #000;


@priColor: #fbaf13;
@secColor: #EC6E6B;

// 彩色下划线
.underline() {
  content: "";
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  position: absolute;
  background: repeating-linear-gradient(-45deg,
  @priColor 0,
  @priColor 20%,
  transparent 0,
  transparent 25%,
  @secColor 0,
  @secColor 45%,
  transparent 0,
  transparent 50%);
  background-size: 100px;
}

//flex box
.flexbox(@jc:space-between, @ai:center, @fd:row, @fw:nowrap) {
  display: flex;
  flex: 1;
  justify-content: @jc;
  align-items: @ai;
  flex-direction: @fd;
  flex-wrap: @fw;
}

// clamp
.textoverflow(@clamp:2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: @clamp;

}

.textoverflow2() {
  text-overflow: ellipsis;
  overflow: hidden;
  display: -webkit-box;
  /* autoprefixer: off */
  -webkit-box-orient: vertical;
  /* autoprefixer: on */
  -webkit-line-clamp: 2;
}

// 字体
.font-dpr(@font-size) {
  font-size: @font-size;
  [data-dpr="2"] & {
    font-size: @font-size*2;
  }
  [data-dpr="3"] & {
    font-size: @font-size*3;
  }
}

@font-face {
  font-family: 'custom-iconfont';
  src: url('../iconfont/iconfont.ttf') format('truetype');
  src: url('../iconfont/iconfont.eot?t=1542948664641'); /* IE9*/
  src: url('../iconfont/iconfont.eot?t=1542948664641#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('../iconfont/iconfont.ttf?t=1542948664641') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ url('../iconfont/iconfont.svg?t=1542948664641#iconfont') format('svg'); /* iOS 4.1- */

}

* {
  touch-action: pan-y;
}

.van-icon {
  font-family: 'vant-icon', 'custom-iconfont' !important;
  .font-dpr(16px);
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bottom-line {
  margin-top: 2Px;
  margin-bottom: 50px;
  padding-bottom: 4Px;
  color: @tipColor;
  .font-dpr(10px);
  text-align: center;
  line-height: 1;
}

.van-nav-bar {
  width: 100%;
  color: @navbarTitle !important;

  &__title {
    .font-dpr(18px) !important;
  }

  .van-icon {
    color: @navbarTitle !important;
    .font-dpr(18px) !important;
  }
}

.van-hairline--bottom::after {
  border-bottom-width: 0 !important;
}

.van-icon-checked, .van-submit-bar__price {
  color: @priColor !important;
}

.van-switch--on, .van-info {
  background-color: @priColor !important;
}

//收货地址
.van-field__body, .van-address-item__address {
  input, textarea {
    .font-dpr(14px) !important;
  }
}

.van-address-item__address {
  .font-dpr(14px) !important;
}

.van-cell__title, .van-address-item__name {
  .font-dpr(14px) !important;
}

.van-checkbox__icon--checked .van-icon {
  background-color: @priColor !important;
  border-color: @priColor !important;
}

//轮播图
.van-swipe {
  position: relative;
  width: 100%;

  img {
    width: 100%;
  }

  &__indicator {
    padding: 0;
    border-radius: 50%;
    background-color: @priColor;
    // border: 1px solid blue;
    width: 8Px;
    height: 8Px;
    font-style: normal;

    &--active {
      background-color: @priColor;
    }
  }
}

// 按钮颜色

.van-button--warning {
  background-color: @priColor;
  border-color: @priColor;
}

.van-button--danger {
  background-color: @secColor !important;
  border-color: @secColor !important;
}

// a 下划线
/deep/ a {
  &:link, &:visited, &:hover, &:active, &:focus {
    text-decoration: none;
  }

  &:focus a:hover {
    text-decoration: none;
  }
}
